If a VMLAUNCH/VMRESUME fails due to invalid control or host state, dump the
VMCS before crashing the domain.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
__vmread(VM_INSTRUCTION_ERROR, &error);
gprintk(XENLOG_ERR, "VM%s error: %#lx\n",
curr->arch.hvm_vmx.launched ? "RESUME" : "LAUNCH", error);
+
+ if ( error == VMX_INSN_INVALID_CONTROL_STATE ||
+ error == VMX_INSN_INVALID_HOST_STATE )
+ vmcs_dump_vcpu(curr);
+
domain_crash_synchronous();
}
#define VMX_GUEST_MSR 0
#define VMX_HOST_MSR 1
+/* VM Instruction error numbers. */
+#define VMX_INSN_INVALID_CONTROL_STATE 7
+#define VMX_INSN_INVALID_HOST_STATE 8
+
void vmx_disable_intercept_for_msr(struct vcpu *v, u32 msr, int type);
void vmx_enable_intercept_for_msr(struct vcpu *v, u32 msr, int type);
int vmx_read_guest_msr(u32 msr, u64 *val);